import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            redirect: '/index'
        },
        {
            path: '/layout',
            component: () => import('@/views/Layout.vue'),
            children: [
                {
                    path: '/index',
                    component: () => import('@/views/layout/Index.vue')
                },
                {
                    path: '/guanli',
                    component: () => import('@/views/layout/GuanLi.vue'),
                    children: [
                        {
                            path: '/yonghu',
                            component: () => import('@/views/layout/guanli/YongHu.vue')
                        },
                        {
                            path: '/juese',
                            component: () => import('@/views/layout/guanli/JueSe.vue')
                        }
                    ]
                }
            ]
        },
    ],
})

export default router
